import ajax from '@/utils/ajax'
import type { CustomResponse } from 'uni-ajax'
import type * as dyUserCodeModel from '@/api/model/dyUserCodeModel'
import type * as dyUserPlayingModel  from "@/api/model/dyUserPlayingModel";
class DyUserCodeService {
    /**
     * 获取用户犯法
     */
    getUserPlayingByCode(
        params: dyUserCodeModel.IGetUserPlayingByCodeParams
    ): Promise<CustomResponse<Array<dyUserCodeModel.IGetUserPlayingByCodeResponse>>> {
      return ajax.get('/tools/dyUserPlaying/getUserPlayingByCode',params)
    }
    /**
     * 
     * @param params 获取用户信息
     * @returns 
     */
    getUserInfoByCode(
        params: dyUserCodeModel.IGetUserInfoByCodeParams
    ): Promise<CustomResponse<dyUserCodeModel.IGetUserInfoByCodeResponse>> {
      return ajax.get('/tools/dyUserPlaying/getUserInfoByCode',params)
    }
    /**
     * 用户完成视频观看
     */
    userComplete(
        params: dyUserCodeModel.IUserCompleteParams
    ): Promise<CustomResponse<null>> {
      return ajax.post('/tools/dyUserPlaying/userComplete',params)
    }

    /**
     * 预估
     */
    useEstimate(
      params: dyUserCodeModel.IUseEstimateParams
    ): Promise<CustomResponse<null>> {
      return ajax.post('/tools/dyUserPlaying/useEstimate',params)
    }

    /**
     * 敏感词过滤
     */
    sensitiveWord(
        params: dyUserCodeModel.ISensitiveWordParams
    ): Promise<CustomResponse<boolean>> {
      return ajax.get('/tools/dyUserPlaying/sensitiveWord',params)
    }
    
    getUserCount(): Promise<CustomResponse<dyUserPlayingModel.IGetUserCountResponse>> {
      return ajax.get('/tools/dyUserPlaying/getUserCount')
    }

    getUserPlayList(): Promise<CustomResponse<Array<dyUserCodeModel.IGetUserPlayingByCodeResponse>>> {
      return ajax.get('/tools/dyUserPlaying/getUserPlayList')
    }
    getAddUserPlayList(): Promise<CustomResponse<Array<dyUserCodeModel.IGetUserPlayingByCodeResponse>>> {
      return ajax.get('/tools/dyUserPlaying/getAddUserPlayList')
    }
    deleteUserPlayId(
      params: dyUserCodeModel.IDeleteUserPlayIdParams
    ): Promise<CustomResponse<null>> {
      return ajax.get('/tools/dyUserPlaying/deleteUserPlayId',params)
    }

    addUserPlayId(
      params: dyUserCodeModel.IAddUserPlayIdParams
    ): Promise<CustomResponse<null>> {
      return ajax.get('/tools/dyUserPlaying/addUserPlayId',params)
    }

    getInComeInfo(): Promise<CustomResponse<Array<dyUserCodeModel.IGetInComeInfoResponse>>> {
      return ajax.get('/tools/dyUserPlaying/getInComeInfo')
    }
    getInComeInfoByDate(
      params: dyUserPlayingModel.IGetInComeInfoByDateParams
    ): Promise<CustomResponse<Array<dyUserCodeModel.IGetInComeInfoResponse>>> {
      return ajax.get('/tools/dyUserPlaying/getInComeInfoByDate',params)
    }

    getUserIncome(): Promise<CustomResponse<dyUserCodeModel.IGetUserIncomeResponse>> {
      return ajax.get('/dy/dyIncome/getUserIncome')
    }
    getUserIncomeInfo(): Promise<CustomResponse<dyUserCodeModel.IGetUserIncomInfoResponse>> {
      return ajax.get('/dy/dyIncome/getUserIncomeInfo')
    }

    viewUser(
        params: dyUserCodeModel.IViewUserParams
    ): Promise<CustomResponse<null>> {
      return ajax.post('/tools/dyUserPlaying/viewUser',params)
    }

    getUserInComeCache(): Promise<CustomResponse<dyUserCodeModel.IGetUserInComeCacheResponse>> {
      return ajax.get('/tools/dyUserPlaying/getUserInComeCache')
    }
    getLeaderboard(): Promise<CustomResponse<any>> {
      return ajax.get('/tools/dyUserPlaying/getLeaderboard')
    }

    getJoinStatus(params: dyUserPlayingModel.IgetJoinStatusParams): Promise<CustomResponse<boolean>> {
      return ajax.get('/tools/dyUserPlaying/getJoinStatus',params)
    }

    getNewOnline(params: dyUserPlayingModel.IGetNewOnlineParams): Promise<CustomResponse<Array<dyUserPlayingModel.IGetNewOnlineResponse>>> {
      return ajax.get('/tools/dyUserPlaying/getNewOnline',params)
    }
    /**
     * 团队信息
     */
    getTeamInformation(params: dyUserPlayingModel.IGetTeamInformationParams): Promise<CustomResponse<Array<dyUserPlayingModel.IGetTeamInformationResponse>>> {
      return ajax.get('/tools/dyUserPlaying/getTeamInformation',params)
    }
   /**
     * 团队成员收益
     */
   getTeamIncome(params: dyUserPlayingModel.IGetTeamIncomeParams): Promise<CustomResponse<Array<dyUserPlayingModel.IGetTeamIncomeResponse>>> {
    return ajax.get('/tools/dyUserPlaying/getTeamIncome',params)
  }
  /**
   * 团队收益信息
   * @param params 
   * @returns 
   */
  getTeamIncomeCount(): Promise<CustomResponse<dyUserPlayingModel.IGetTeamIncomeCountResponse>> {
    return ajax.get('/tools/dyUserPlaying/getTeamIncomeCount')
  }

  changeRecord(params: dyUserPlayingModel.IChangeRecordParams): Promise<CustomResponse<Array<dyUserPlayingModel.IChangeRecordResponse>>> {
    return ajax.get('/tools/dyUserPlaying/changeRecord',params)
  }
  /**
   * 收益明细
   * @param params 
   * @returns 
   */
  getInComeInfoByTime(params: dyUserPlayingModel.IGetInComeInfoByTimeParams): Promise<CustomResponse<dyUserPlayingModel.IGetInComeInfoByTimeResponse>> {
    return ajax.get('/tools/dyUserPlaying/getInComeInfoByTime',params)
  }
  
  /**
   * 收益汇总
   * @param params 
   * @returns 
   */
  getInComeCountByTime(params: dyUserPlayingModel.IGetInComeCountByTimeParams): Promise<CustomResponse<dyUserPlayingModel.IGetInComeCountByTimeResponse>> {
    return ajax.get('/tools/dyUserPlaying/getInComeCountByTime',params)
  }

  }
  
  export default new DyUserCodeService()
  